<%@ page contentType="text/html;charset=utf-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta name="format-detection" content="telephone=no">
    <title>
        省外迁出登记
    </title>
    <link rel="stylesheet" href="<c:url value="/resource/mobile/css/frozen.css"></c:url>">
    <link rel="stylesheet" href="<c:url value="/resource/mobile/css/weui.css"></c:url>">
    <link rel="stylesheet" href="<c:url value="/resource/mobile/css/example.css"></c:url>">
    <link rel="stylesheet" href="<c:url value="/resource/mobile/css/main.css"></c:url>">
    <link rel="stylesheet" type="text/css" href="<c:url value="/resource/mobile/css/yulan.css"></c:url>"/>
    <link rel="stylesheet" type="text/css" href="<c:url value='/resource/wechat/css/font-awesome.min.css'/>">
    <style>
        .ui-form-item-show label {
            color: #000;
        }

        .ui-form-item input {
            color: #000;
        }

        .ui-form-item-textarea textarea {
            margin-top: 11px;
        }

        /*上传附件*/
        .weui_uploader_bd {
            overflow: inherit;
        }

        .weui_uploader_file {
            position: relative;
        }

        .onload {
            background: rgba(0, 0, 0, 0.6);
            width: 50%;
            height: 20%;
            border-radius: 5px;
            color: #fff;
            text-align: center;
            position: fixed; /**定位采用此种方式**/
            left: 50%; /**左边50%**/
            top: 50%; /**顶部50%**/
            margin-top: -100px; /**上移-50%**/
            margin-left: -100px; /**左移-50%**/
            padding-top: 10%;
        }

        .onload p {
            /*margin-top: 40%;*/
            font-size: 16px;
        }

        .success_p1 {
            text-align: center;
            color: #fff;
            background: rgba(32, 30, 30, 0.81);
            line-height: 50px;
            position: fixed; /**定位采用此种方式**/
            left: 50%; /**左边50%**/
            top: 50%; /**顶部50%**/
            margin-top: -100px; /**上移-50%**/
            margin-left: -100px; /**左移-50%**/
            width: 60%;
            border-radius: 5px;
            font-size: 14px;
        }

        .success_p1 .fa {
            /*margin-right: 10px;*/
        }
    </style>
    <script src="<c:url value='/resource/js/jquery-2.0.min.js'/>"></script>
    <script type="text/javascript" src="<c:url value='/resource/js/jquery.form.min.js'/>"></script>
    <script src="<c:url value='/resource/wechat/js/FormValid.js'/>"></script>
    <script type="text/javascript" src="<c:url value='/resource/mobile/js/main.js'/>"></script>
    <script type="text/javascript" src="<c:url value='/resource/mobile/js/yulan.js'/>"></script>
    <script type="text/javascript" src="https://gaapi.jl.gov.cn/logservice/resource/js/os.analystic-1.4.min.js"></script>
    <script type="text/javascript">

$(function () {
    var _html = "<option >请选择</option>";
    _html += "<option >昆明市</option>";
    _html += "<option >曲靖市</option>";
    _html += "<option >昭通市</option>";
    _html += "<option >玉溪市</option>";
    _html += "<option >楚雄州</option>";
    _html += "<option >红河州</option>";
    _html += "<option >文山州</option>";
    _html += "<option >普洱市</option>";
    _html += "<option >版纳州</option>";
    _html += "<option >大理州</option>";
    _html += "<option >德宏州</option>";
    _html += "<option >保山市</option>";
    _html += "<option >丽江市</option>";
    _html += "<option >怒江州</option>";
    _html += "<option >迪庆州</option>";
    _html += "<option >临沧市</option>";
    $("#S").empty();
    $("#S").prepend(_html);
});
        function changeQuYu(id) {

            $("#S3").hide();
            //id:代表市局ID
            var _html = "<option >请选择</option>";
            if(id=="昆明市"){
            _html += "<option >五华区</option>";
            _html += "<option >盘龙区</option>";
            _html += "<option >官渡区</option>";
            _html += "<option >西山区</option>";
            _html += "<option >呈贡区</option>";
            _html += "<option >晋宁区</option>";
            _html += "<option >东川区</option>";
            _html += "<option >安宁市</option>";
            _html += "<option >富民县</option>";
            _html += "<option >嵩明县</option>";
            _html += "<option >宜良县</option>";
            _html += "<option >石林彝族自治县</option>";
            _html += "<option >寻甸回族彝族自治县</option>";
            _html += "<option >禄劝彝族苗族自治县</option>";
                $("#Q").empty();
                $("#Q").prepend(_html);
                $("#S2").show();
            }
            else{
                _html ="";
                $("#Q").empty();
                $("#Q").prepend(_html);
                $("#S2").hide();
            }
        }
        function changePaics(id) {

            var _html = "<option>请选择</option>";
            if(id=='五华区'){
                _html += "<option >五华区马村派出所</option>";
                _html += "<option >五华区茭菱派出所</option>";
                _html += "<option >五华区丰宁派出所</option>";
                _html += "<option >五华区黑林铺派出所</option>";
                _html += "<option >五华区王家桥派出所</option>";
            }else
            if(id=='盘龙区') {
                _html += "<option >盘龙区小坝派出所</option>";
                _html += "<option>盘龙区东华派出所</option>";
                _html += "<option >盘龙区穿金路派出所</option>";
                _html += "<option>盘龙区龙头街派出所</option>";
                _html += "<option >盘龙区双龙派出所</option>";
            }else
            if(id=='官渡区') {
                _html += "<option >官渡区金马派出所</option>";
                _html += "<option>官渡区凉亭派出所</option>";
                _html += "<option >官渡区吴井派出所</option>";
                _html += "<option>官渡区关上派出所</option>";
                _html += "<option >官渡区春城路派出所</option>";
            }else
            if(id=='西山区') {
                _html += "<option >西山区团结派出所</option>";
                _html += "<option>西山区刘家营派出所</option>";
                _html += "<option >西山区前卫派出所</option>";
                _html += "<option>西山区谷律派出所</option>";
                _html += "<option >西山区山冲派出所</option>";
                _html += "<option >西山区马鞍山派出所</option>";
                _html += "<option >西山区向阳派出所</option>";
                _html += "<option >西山区湖滨派出所</option>";
                _html += "<option >西山区金牛派出所</option>";
                _html += "<option >西山区明朗派出所</option>";
                _html += "<option >西山区西华派出所</option>";
            }else
            if(id=='呈贡区') {
                _html += "<option >呈贡区城关派出所</option>";
                _html += "<option>呈贡区龙街派出所</option>";
                _html += "<option >呈贡区吴家营派出所</option>";
                _html += "<option>呈贡区石龙湖派出所</option>";
                _html += "<option >呈贡区雨花派出所</option>";
            }else
            if(id=='晋宁区') {
                _html += "<option >晋宁县二街派出所</option>";
                _html += "<option>晋宁县宝峰派出所</option>";
                _html += "<option >晋宁县双河派出所</option>";
                _html += "<option>晋宁县夕阳派出所</option>";
                _html += "<option >晋宁县上蒜派出所</option>";
            }else
            if(id=='安宁市') {
                _html += "<option >安宁市县街派出所</option>";
                _html += "<option>安宁市禄脿派出所</option>";
                _html += "<option >安宁市青龙派出所</option>";
                _html += "<option>安宁市草铺派出所</option>";
                _html += "<option >安宁市温泉派出所</option>";
            }else
            if(id=='富民县') {
                _html += "<option >富民县赤就派出所</option>";
                _html += "<option>富民县款庄派出所</option>";
                _html += "<option >富民县东村派出所</option>";
                _html += "<option>富民县散旦派出所</option>";
                _html += "<option >富民县城关派出所</option>";
            }else
            if(id=='嵩明县') {
                _html += "<option >嵩明县嵩阳派出所</option>";
                _html += "<option>嵩明县杨桥派出所</option>";
                _html += "<option >嵩明县小街派出所</option>";
                _html += "<option>嵩明县牛栏江派出所</option>";
                _html += "<option >嵩明县小新街派出所</option>";
            }else
            if(id=='宜良县') {
                _html += "<option >宜良县柴石滩派出所</option>";
                _html += "<option>宜良县匡远派出所</option>";
                _html += "<option >宜良县蓬莱派出所</option>";
                _html += "<option>宜良县古城派出所</option>";
                _html += "<option >宜良县耿家营派出所</option>";
            }else
            if(id=='石林彝族自治县') {
                _html += "<option >石林县岔口派出所</option>";
                _html += "<option>石林县板桥派出所</option>";
                _html += "<option >石林县大可派出所</option>";
                _html += "<option>石林县长湖派出所</option>";
                _html += "<option >石林县圭山派出所</option>";
            }else
            if(id=='寻甸回族彝族自治县') {
                _html += "<option >寻甸县仁德派出所</option>";
                _html += "<option>寻甸县塘子派出所</option>";
                _html += "<option >寻甸县七星派出所</option>";
                _html += "<option>寻甸县河口派出所</option>";
                _html += "<option >寻甸县功山派出所</option>";
            }else
            if(id=='禄劝彝族苗族自治县') {
                _html += "<option >禄劝县崇德派出所</option>";
                _html += "<option>禄劝县翠华派出所</option>";
                _html += "<option >禄劝县九龙派出所</option>";
                _html += "<option>禄劝县转龙派出所</option>";
                _html += "<option >禄劝县乌蒙派出所</option>";

            }else{
                _html="";
            }
            if(_html==""){
                $("#P").empty();
                $("#P").prepend(_html);
                $("#S3").hide();
            }else{
                $("#P").empty();
                $("#P").prepend(_html);
                $("#S3").show();
            }


        }
        function readFile(obj, index) {
//            var file = obj.files[0];
//            //判断类型是不是图片
//            if (!/image\/\w+/.test(file.type)) {
//
//                $("#fileValue" + index).val("");
//                obj.outerHTML = obj.outerHTML.replace(/(value=\").+\"/i, "$1\"");
//                fail("请确保文件为图像类型");
//                return false;
//            }
//            for (var i = 0; i < 1; i++) {
//                var file = obj.files[i];
//                var url = null;
//                if (window.createObjectURL != undefined) {
//                    url = window.createObjectURL(file);
//                } else if (window.URL != undefined) {
//                    url = window.URL.createObjectURL(file);
//                } else if (window.webkitURL != undefined) {
//                    url = window.webkitURL.createObjectURL(file);
//                }
//                $('#img' + index).empty();
//                $('#img' + index).append("<li class='weui_uploader_file' ><img width='79px' height='79px' onclick='showDtetail(\"" + url + "\")' src='" + url + "'/><div class='sxsb_close' onclick='doRemovePic(\"" + index + "\");'></div></li>");
//                $("#pic_" + index).css("display", "none");
//            }
//        }
//        function doRemovePic(index) {
//            $("#fileName" + index).val("");
//            $('#img' + index).empty();
//            $("#pic_" + index).show();
//        }
//        function showDtetail(url) {
//            $.showPic(url);
//        }
//        function orderItem() {
//            if ($("#S").val() == "") {
//                fail("请选择审批部门！");
//                return;
//            }
//            if ($("#Q").val() == "") {
//                fail("请选择审批部门！");
//                return;
//            }
//            var P = $("#P").val();
//            var Q = $("#Q").val();
//            if ($("#pd").val() == 1) {
//                $("#orgId").val(P);
//            }
//            else {
//                $("#orgId").val(Q);
//            }
        alert("预约成功");
        window.location.href="<c:url value="/weixin/wx_member/index"/>";
        }

    </script>
</head>
<body class="body_bg" ontouchstart>
<section class="ui-container">
    <ul class="ul_lost">
        <li>
            <h1 class="h1_text" style="color: #0c72c8; font-size: 16px;margin: 0px 10px; ">省外迁出登记</h1>
        </li>
    </ul>

    <div class="ui-form" style="width: 100%;float: left;">
        <form action="#">
            <div class="ui-form-item ui-form-item-show ui-border-b">
                <label for="#">姓名</label>
                <input type="text" value="${aliasNameWjb}" placeholder="" readonly>
            </div>

            <%--<div class="ui-form-item ui-form-item-show ui-border-b">--%>
                <%--<label for="#">身份证号</label>--%>
                <%--<input type="text" id="idCard" value="${member.idCard}" readonly>--%>
            <%--</div>--%>

            <div class="ui-form-item ui-form-item-show ui-border-b">
                <label for="#">手机号码</label>
                <input type="text" value="${telephoneWjb}" readonly>
            </div>

            <%--<div class="ui-form-item ui-form-item-show ui-border-b">--%>
                <%--<label for="#">联系地址</label>--%>
                <%--<input type="text" value="${member.address}">--%>
            <%--</div>--%>
            <div class="ui-form-item ui-border-b" id="S1" style="display:block;">
                <label>审批部门</label>
                <div class="ui-select">
                    <select id="S" onchange="changeQuYu(this.value);">
                    </select>
                </div>
            </div>
            <div class="ui-form-item ui-border-b" id="S2" style="display:none;">
                <label></label>
                <div class="ui-select">
                    <select id="Q" onchange="changePaics(this.value);">
                    </select>
                </div>
            </div>
            <div class="ui-form-item ui-border-b" id="S3" style="display:none;">
                <label></label>
                <div class="ui-select">
                    <select id="P">
                    </select>
                </div>
            </div>
        </form>
    </div>
</section>

<form id="uploadForm" enctype="multipart/form-data" method="post">
    <input type="hidden" name="pt" value="${pt}"/>
    <input type="hidden" name="userGuid" value="${userGuid}"/>
    <input type="hidden" name="caseNo" value="${caseNo}"/>
    <input type="hidden" id="orgId" name="orgid" value="${orgid}"/>
    <input type="hidden" name="addr" value="${member.address}"/>
    <input type="hidden" id="pd" value=""/>
        <div class="scfj_p">请上传附件材料</div>
            <div style="width: 100%;float: left;">
                <div class="weui_cells weui_cells_form" style="margin-top: 0px;">
                    <div class="weui_cell">
                        <div class="weui_cell_bd weui_cell_primary">
                            <div class="weui_uploader">
                                <div class="weui_uploader_hd weui_cell">
                                    <div class="weui_cell_bd weui_cell_primary">
                                            <span style="color: #ff0000;">*</span>
                                           迁入地公安机关签发的《准予迁入证明》</div>
                                    <div class="weui_cell_ft"></div>
                                </div>
                                <div class="weui_uploader_bd" style="margin-top: 10px;">
                                    <ul class="weui_uploader_files" id="img1">

                                    </ul>
                                    <div class="weui_uploader_input_wrp" id="pic_1"
                                         style="display: block;">
                                        <input class="weui_uploader_input" type="file" valid="required"
                                               errmsg="请上传  迁入地公安机关签发的《准予迁入证明》" name="fileName"
                                               id="fileName1"
                                               accept="image/jpg,image/jpeg,image/png,image/gif"
                                               onchange="readFile(this,'1')">
                                        <input type="hidden" name="fileValue1"
                                               id="fileValue1"/>

                                        <input type="hidden" value="${material.guid}" name="guid1"
                                               id="guid1"/>
                                        <input type="hidden" value="${material.rownum}" name="sort1"
                                               id="sort1"/>
                                        <input type="hidden" value="${material.ismust}" name="must1"
                                               id="must1"/>
                                        <input type="hidden" value="${material.material}" name="material1"
                                               id="material1"/>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

    <div style="width: 100%;float: left;">
        <div class="weui_cells weui_cells_form" style="margin-top: 0px;">
            <div class="weui_cell">
                <div class="weui_cell_bd weui_cell_primary">
                    <div class="weui_uploader">
                        <div class="weui_uploader_hd weui_cell">
                            <div class="weui_cell_bd weui_cell_primary">

                                <span style="color: #ff0000;">*</span>
                                居民户口薄</div>
                            <div class="weui_cell_ft"></div>
                        </div>
                        <div class="weui_uploader_bd" style="margin-top: 10px;">
                            <ul class="weui_uploader_files" id="img2">

                            </ul>
                            <div class="weui_uploader_input_wrp" id="pic_2"
                                 style="display: block;">
                                <input class="weui_uploader_input" type="file" valid="required"
                                       errmsg="请上传  居民户口薄" name="fileName"
                                       id="fileName2"
                                       accept="image/jpg,image/jpeg,image/png,image/gif"
                                       onchange="readFile(this,'2')">
                                <input type="hidden" name="fileValue2"
                                       id="fileValue2"/>

                                <input type="hidden" value="${material.guid}" name="guid2"
                                       id="guid2"/>
                                <input type="hidden" value="${material.rownum}" name="sort2"
                                       id="sort2"/>
                                <input type="hidden" value="${material.ismust}" name="must2"
                                       id="must2"/>
                                <input type="hidden" value="${material.material}" name="material2"
                                       id="material2"/>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="ui-form" style="width: 100%;float: left;margin-bottom: 20px;">
        <div class="ui-form-item ui-form-item-show ui-border-b">
            <label for="#">预约日期</label>
            <select id="yyTime" name="yyTime"
                    style="margin-left: 32%; width: 50%; border: 0px; height: 100%; text-indent: 5px;float: left; display: inline">

                <option value="">2017-05-23</option>
                <option value="">2017-05-24</option>
                <option value="">2017-05-25</option>
                <option value="">2017-05-26</option>

            </select>
        </div>
        <div class="ui-form-item ui-border-b">
            <label>预约时间</label>
            <label class="ui-radio" for="radio" style="float: left;margin: 8px 0 0 92px;">
                <input type="radio" name="checkbox" id="checkbox1" checked value="上午">上午
                <input type="radio" name="checkbox" id="checkbox2" value="下午" style="margin-left: 10px;">下午
            </label>
        </div>

    </div>
</form>
<div class="ui-btn-wrap">
    <button class="ui-btn-lg ui-btn-primary" id="orderButton" onclick="orderItem()">
        预约
    </button>
</div>
</body>

</html>